package main

import (
	"ginDemo/controller"
	"github.com/gin-gonic/gin"
)



func main() {
	r := gin.Default()
	r.LoadHTMLGlob("template/**/*")  //加载所有模板文件
	r.Static("/static", "static") //加载静态文件
	getApi(r)
	r.Run(":8081") //更高端口，前面要带个冒号
}

func getApi(r *gin.Engine) {
	r.GET("/hello", controller.Hello)
	r.GET("/user", controller.User)
	r.GET("/userInfo", controller.UserInfoStruct)
	r.GET("/arr", controller.ArrControl)
}
